package com.umanji.message.domain;

import java.util.Date;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.umanji.category.domain.Categories;
import com.umanji.generic.entity.UUIDEntity;
import com.umanji.security.domain.Users;
import com.umanji.user.domain.Members;

@Entity
@Table(name="umanji_message")
public class Messages extends UUIDEntity<Messages> {

    @ManyToOne
    @JoinColumn(name = "member_fk", insertable=false, updatable=false)
	private Members sender;

	@ManyToOne
	@JoinColumn(name = "member_fk", insertable=false, updatable=false)
	private Members receiver;

	private String title;
	
	@Column(name="CONTENTS", length=500)
	private String content;

	@Temporal(TemporalType.DATE)
	private Date regDate;

	public Members getSender() {
		return sender;
	}
	
	public void setSender(Members sender) {
		this.sender = sender;
	}

	public Date getRegDate() {
		return regDate;
	}
	public void setRegDate(Date regDate) {
		this.regDate = regDate;
	}

	public Members getReceiver() {
		return receiver;
	}

	public void setReceiver(Members receiver) {
		this.receiver = receiver;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
